<!DOCTYPE html>
{% load static %}
<script type="text/javascript" src="{% static 'ckeditor/ckeditor/ckeditor.js' %}"></script>
<script type="text/javascript" src="{% static 'ckeditor/ckeditor-init.js' %}"></script>
<html>
<head>
    {% if result == "更新成功" %}
    <meta http-equiv="refresh" content="3;URL=article/{{id}}/0">
    {% endif %}
    <title>更新问题</title>
    <style>
	input,textarea{
    outline-style: none ;
    border: 1px solid #ccc;
    border-radius: 12px;
    padding: 10px 14px;
    width: 60%;
    font-size: 16px;
    font-weight: 700;
    font-family: "Microsoft soft";
    }
	input:focus{
        border-color: #66afe9;
        outline: 0;
        -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
        box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)
    }
    </style>
</head>

<body style="position:relative">
<p align="center" style="font-size: 40px;color: red">{{ result }}</p>
{% if result == "更新成功" %}
<p align="center" style="font-size: 40px;color: red;text-decoration:none">3s后自动返回首页</p>
{% else %}
<form action="/resource/reload" method="post" style="color:red;font-size:20px;left:10%;position:relative;width:80%">
    {% csrf_token %}
    <p>标题：<input type="text" name="title" value="{{problem.title}}"></p>
    <p>记录类型：
        {% for type in type_list %}
        {% if type == problem.type %}
        <input style="width:auto" type="radio" name="type" value="{{type.id}}" checked>{{ type.type }}
        {% else %}
        <input style="width:auto" type="radio" name="type" value="{{type.id}}">{{ type.type }}
        {% endif %}
        {% endfor %}
    </p>
    <p>正文：</p>
    <textarea cols="40" id="id_contents" name="contents" rows="10" required data-processed="0"
              data-config="{&quot;skin&quot;: &quot;moono-lisa&quot;, &quot;toolbar_Basic&quot;: [[&quot;Source&quot;, &quot;-&quot;, &quot;Bold&quot;, &quot;Italic&quot;]], &quot;toolbar_Full&quot;: [[&quot;Styles&quot;, &quot;Format&quot;, &quot;Bold&quot;, &quot;Italic&quot;, &quot;Underline&quot;, &quot;Strike&quot;, &quot;SpellChecker&quot;, &quot;Undo&quot;, &quot;Redo&quot;], [&quot;Link&quot;, &quot;Unlink&quot;, &quot;Anchor&quot;], [&quot;Image&quot;, &quot;Flash&quot;, &quot;Table&quot;, &quot;HorizontalRule&quot;], [&quot;TextColor&quot;, &quot;BGColor&quot;], [&quot;Smiley&quot;, &quot;SpecialChar&quot;], [&quot;Source&quot;]], &quot;toolbar&quot;: &quot;full&quot;, &quot;height&quot;: 700, &quot;width&quot;: &quot;auto&quot;, &quot;filebrowserWindowWidth&quot;: 940, &quot;filebrowserWindowHeight&quot;: 725, &quot;extraPlugins&quot;: &quot;codesnippet&quot;, &quot;filebrowserUploadUrl&quot;: &quot;/ckeditor/upload/&quot;, &quot;filebrowserBrowseUrl&quot;: &quot;/ckeditor/browse/&quot;, &quot;language&quot;: &quot;zh-cn&quot;}"
              data-external-plugin-resources="[]" data-id="id_contents" data-type="ckeditortype">{{problem.content}}</textarea>
    <input style="font-size:20px" type="submit" value="发布">
    <input type="hidden" name="id" value="{{problem.article_id}}"></p>
</form>
{% endif %}
</body>
</html>